package com.raowb.common.enums;

import com.raowb.common.base.entitys.BaseEntity;
import com.raowb.common.base.entitys.BaseIDEntity;
import com.raowb.common.base.entitys.BaseTreeEntity;

/**
 * 
* @Description: 实体类型 
* @author: RaoWenbiao
* @date 2019年1月9日
 */
public enum EntityTypeEnum {
	Base("Base", BaseEntity.class.getName()), 
	BaseID("BaseID",BaseIDEntity.class.getName()),
	BaseTree("BaseTree",BaseTreeEntity.class.getName());

	private String type;
	private String className;

	EntityTypeEnum(final String type, final String className) {
		this.type = type;
		this.className = className;
	}

	public static EntityTypeEnum getByType(String type){
		for(EntityTypeEnum entity:EntityTypeEnum.values()){
			if(entity.getType().equals(type)){
				return entity;
			}
		}		
		return null;
	}

	public String getType() {
		return type;
	}

	public String getClassName() {
		return className;
	}
	
	
	
}
